<%-- ExMobi JSP文件，注释和取消快捷键统一为Ctrl+/ 多行注释为Ctrl+Shift+/ --%>
<%@ page language="java" import="java.util.*,sun.net.ftp.*,java.net.*"
 contentType="application/text; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/client/adapt.jsp"%>
<%@ include file="/client/adapt_extend.jsp"%>
<%@ include file="properties.jsp" %>
<%
  JSONObject json = new JSONObject();
  String path = "/download/test.docx";
  String filename = "test.docx";
  String param = aa.req.getParameter("data");
  if(param.length()>0){
	  path = aa.common.deBase64(param);
	  filename =path.substring(path.lastIndexOf("/"));
  
  
  FtpClient ftp  = FtpClient.create();
  try{
      //连接ftp
      ftp.connect(new InetSocketAddress(_ftp_ip,_ftp_port));
      ftp.login(_ftp_userid, _ftp_pwd.toCharArray());
	  ftp.setBinaryType();  
	  ftp.deleteFile(path);
	  out.print("文件已删除！");
  }catch(Exception e){
	  String msg  = "FTP服务通讯失败！";
	  if(e instanceof java.io.FileNotFoundException){
		  msg = "文件不存在！";
	  }
	  System.out.println(msg+" 错误信息："+e);
	  out.print(msg+" 错误信息："+e);
  }finally{
		ftp.close();
  }
  }else{
	  out.print("文件信息不能为空！");
  }
%>
